package com.atguigu;

import com.atguigu.config.MainConfigOfLifeCycle;
import org.junit.Test;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author Honglixi
 * @create 2021-03-26 21:46
 */
public class IOCTest_LifeCycle {
    @Test
    public void test01(){
        //1.创建ioc容器
        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(MainConfigOfLifeCycle.class);
        System.out.println("容器创建完成");
//        applicationContext.getBean("car");
        applicationContext.close();
    }
}
